package com.example.mapper;

import com.example.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    User getUserByNameAndPwd(@Param("username") String username, @Param("pwd") String pwd);

    List<User> getUserList(@Param("realname") String realname);

    User getUserByUname(@Param("uname") String uname);

    int insert(@Param("user") User user);

    User getUserById(@Param("id") Integer id);

    int update(@Param("user") User user);

    int delUserById(@Param("id") int id);

    int delBatch(@Param("ids") List<Integer> idList);

    int countSameRealname(@Param("realname")String realname);

    User getUserByAccount(@Param("id") Integer id);

    User getUserAllInfoById(@Param("id") int id);
}
